/*     */ package com.lmpop.trade.ti_relanguage;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class Ti_relanguageInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */ 
/*     */   public Ti_relanguageInfo()
/*     */   {
/*  15 */     this.queryList = new QueryList();
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  24 */     Ti_relanguage ti_relanguage = new Ti_relanguage();
/*  25 */     ti_relanguage.setLang_id(map.getString("lang_id"));
/*  26 */     ti_relanguage.setResume_id(map.getString("resume_id"));
/*  27 */     ti_relanguage.setLang_type(map.getString("lang_type"));
/*  28 */     ti_relanguage.setRw_type(map.getString("rw_type"));
/*  29 */     ti_relanguage.setLs_type(map.getString("ls_type"));
/*     */ 
/*  31 */     String result_code = "0";
/*     */     try {
/*  33 */       insert(dbmMgr, ti_relanguage);
/*     */     } catch (ApplicationException e) {
/*  35 */       e.printStackTrace();
/*  36 */       result_code = "1";
/*     */     }
/*  38 */     map.setString("result_code", result_code);
/*  39 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_relanguage ti_relanguage)
/*     */     throws ApplicationException
/*     */   {
/*  48 */     dbmMgr.update("insertTi_relanguage", ti_relanguage);
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  58 */     String pkid_string = map.getString("pkid");
/*  59 */     String result_code = "0";
/*     */     try {
/*  61 */       if (!pkid_string.equals("")) {
/*  62 */         String[] pkStr = pkid_string.split("\\|");
/*  63 */         for (int i = 0; i < pkStr.length; i++) {
/*  64 */           if (pkStr[i].equals("")) continue; delete(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/*  68 */       e.printStackTrace();
/*  69 */       result_code = "1";
/*     */     }
/*  71 */     map.setString("result_code", result_code);
/*  72 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/*  81 */     dbmMgr.update("deleteTi_relanguage", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap deleteByResumeid(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  90 */     String pkid_string = map.getString("pkid");
/*  91 */     String result_code = "0";
/*     */     try {
/*  93 */       if (!pkid_string.equals("")) {
/*  94 */         String[] pkStr = pkid_string.split("\\|");
/*  95 */         for (int i = 0; i < pkStr.length; i++) {
/*  96 */           if (pkStr[i].equals("")) continue; deleteByResumeid(dbmMgr, pkStr[i]);
/*     */         }
/*     */       }
/*     */     } catch (ApplicationException e) {
/* 100 */       e.printStackTrace();
/* 101 */       result_code = "1";
/*     */     }
/* 103 */     map.setString("result_code", result_code);
/* 104 */     return map;
/*     */   }
/*     */ 
/*     */   public void deleteByResumeid(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/* 113 */     dbmMgr.update("deleteTi_relanguageByResumeid", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 122 */     Ti_relanguage ti_relanguage = new Ti_relanguage();
/* 123 */     ti_relanguage.setLang_id(map.getString("lang_id"));
/* 124 */     ti_relanguage.setResume_id(map.getString("resume_id"));
/* 125 */     ti_relanguage.setLang_type(map.getString("lang_type"));
/* 126 */     ti_relanguage.setRw_type(map.getString("rw_type"));
/* 127 */     ti_relanguage.setLs_type(map.getString("ls_type"));
/*     */ 
/* 129 */     String result_code = "0";
/*     */     try {
/* 131 */       update(dbmMgr, ti_relanguage);
/*     */     } catch (ApplicationException e) {
/* 133 */       e.printStackTrace();
/* 134 */       result_code = "1";
/*     */     }
/* 136 */     map.setString("result_code", result_code);
/* 137 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_relanguage ti_relanguage)
/*     */     throws ApplicationException
/*     */   {
/* 146 */     dbmMgr.update("updateTi_relanguage", ti_relanguage);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 156 */     Ti_relanguage ti_relanguage = (Ti_relanguage)obj;
/* 157 */     if (start == 0)
/* 158 */       start = 0;
/*     */     else {
/* 160 */       start = (start - 1) * limit;
/*     */     }
/* 162 */     ti_relanguage.setStart(Integer.valueOf(start));
/* 163 */     ti_relanguage.setLimit(Integer.valueOf(limit));
/* 164 */     return this.queryList.getList("getListByTi_relanguagePage", ti_relanguage);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 175 */     Ti_relanguage ti_relanguage = (Ti_relanguage)obj;
/* 176 */     List list = this.queryList.getList("getCountByObjTi_relanguage", obj);
/* 177 */     int count = 0;
/* 178 */     if ((list != null) && (list.size() > 0)) {
/* 179 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 180 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 181 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 184 */     return count;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 194 */     return this.queryList.getList("getTi_relanguageByPk", pk);
/*     */   }
/*     */ 
/*     */   public Boolean checkRepeat(String resume_id, String lang_type)
/*     */   {
/* 199 */     Map ti_relanguage = new Hashtable();
/* 200 */     ti_relanguage.put("resume_id", resume_id);
/* 201 */     ti_relanguage.put("lang_type", lang_type);
/* 202 */     List list = this.queryList.getList("checkLangRepeat", ti_relanguage);
/* 203 */     if ((list != null) && (list.size() > 0)) {
/* 204 */       return Boolean.valueOf(true);
/*     */     }
/* 206 */     return Boolean.valueOf(false);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_relanguage.Ti_relanguageInfo
 * JD-Core Version:    0.6.0
 */